﻿namespace WeWork.Model
{
    /// <summary>
    /// 位置
    /// </summary>
    public class ChatLocation : MsgChatRoomBase
    {
        /*
        {
            "msgid":"2641513858500683770_1603876152",
            "action":"send",
            "from":"icefog",
            "tolist":["wmN6etBgAA0sbJ3invMvRxPQDFoq9uWA"],
            "roomid":"",
            "msgtime":1603876152141,
            "msgtype":"location",
            "location":{
                "longitude":116.586285899,
                "latitude":39.911125799,
                "address":"北京市xxx区xxx路xxx大厦x座",
                "title":"xxx管理中心",
                "zoom":15
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public LocationInfo location { set; get; }
    }

    public class LocationInfo
    {
        /// <summary>
        /// 经度，单位double
        /// </summary>
        public double longitude { set; get; }
        /// <summary>
        /// 纬度，单位double
        /// </summary>
        public double latitude { set; get; }
        /// <summary>
        /// 地址信息。String类型
        /// </summary>
        public string address { set; get; }
        /// <summary>
        /// 位置信息的title。String类型
        /// </summary>
        public string title { set; get; }
        /// <summary>
        /// 缩放比例。Uint32类型
        /// </summary>
        public int zoom { set; get; }
    }
}
